<template>
<!-- 商户管理列表 -->
  <div class="app-container">
    <!--搜索组件-->
    <Search :query="query" ref="search" />
    <!-- 操作按钮 -->
    <div class="overtable-btns">
      <el-button size="mini" type="primary" icon="el-icon-circle-plus-outline">添加商户</el-button>
      <el-button size="mini" type="warning" icon="el-icon-download">报表导出</el-button>
    </div>
    <!--表格渲染-->
    <!-- v-loading="loading" -->
    <el-table :data="datahh" tooltip-effect="dark" size="small">
      <el-table-column type="index" label="序号" fixed="left" />
      <el-table-column prop="qq" label="商户号" />
      <el-table-column prop="ww" label="商户名称" />
      <el-table-column prop="ee" label="联系电话" width="130" />
      <el-table-column prop="rr" label="服务商姓名" width="100" />
      <el-table-column prop="tt" label="服务商号" width="130" />
      <el-table-column label="状态" align="center">
        <template slot-scope="scope">
          <div>
            {{scope.row.yy}}
            <!-- <el-tag :type="scope.row.isVerify ? '' : 'info'">{{ scope.row.isVerify ? '通过' : '未审核' }}</el-tag> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="createdAt" label="创建日期" width="200">
        <template slot-scope="scope">
          <span>{{scope.row.ii}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="90" fixed="right">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="toDetail(scope.row, '1')">基本信息</el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="90" fixed="right">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="toDetail(scope.row, '2')">账号管理</el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="90" fixed="right">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="toDetail(scope.row, '3')">资金管理</el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="90" fixed="right">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="toDetail(scope.row, '4')">锁客管理</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!--分页组件-->
    <el-pagination
      :total="total"
      :current-page="page"
      :pager-count="5"
      style="margin-top: 8px;"
      layout="total, prev, pager, next, sizes, jumper"
      @size-change="sizeChange"
      @current-change="pageChange"
    />
  </div>
</template>

<script>
import checkPermission from '@/utils/permission'
import initTable from '@/mixins/initTable'
import { parseTime } from '@/utils/index'
import Search from './search'
export default {
  components: { Search },
  mixins: [initTable],
  data() {
    return {
      datahh: [
        {
          qq: '2016-05-02',
          ww: '王小虎',
          ee: '上海',
          rr: '普陀区',
          tt: '上海市普陀区',
          yy: 200333,
          uu: '17612775057',
          ii: 'hahahahha'
        }
      ]
    }
  },
  methods: {
    toDetail(info, index) {
      console.log(info)
      if (index == 1) {
        this.$router.push({
          path: '/merchant/listDetail'
        })
      } else if (index == 2) {
        this.$router.push({
          path: '/merchant/listAccountSecurity'
        })
      } else if (index == 3) {
        this.$router.push({
          path: '/merchant/listFundDetail'
        })
      } else if (index == 4) {
        this.$router.push({
          path: '/merchant/listLocker'
        })
      }
    }
  }
}
</script>

<style>
</style>
